package leetcode.bfs;

import leetcode.bfs.common.BFSUtils;
import leetcode.tree.common.TreeNode;
import leetcode.tree.common.TreeUtils;

import java.util.List;

/**
 * Definition for a binary tree node.
 * public class TreeNode {
 * int val;
 * TreeNode left;
 * TreeNode right;
 * TreeNode() {}
 * TreeNode(int val) { this.val = val; }
 * TreeNode(int val, TreeNode left, TreeNode right) {
 * this.val = val;
 * this.left = left;
 * this.right = right;
 * }
 * }
 */
class Solution1305 {
    public List<Integer> getAllElements(TreeNode root1, TreeNode root2) {
        return BFSUtils.getAllElements(root1, root2);
    }
}

public class leetcode1305 {
    public static void main(String[] args) {
        Solution1305 solution1305 = new Solution1305();
        Integer[] root1 = {2, 1, 4};
        Integer[] root2 = {1, 0, 3};
        System.out.println(solution1305.getAllElements(TreeUtils.generateLeetcodeTree(root1), TreeUtils.generateLeetcodeTree(root2)));
    }
}
